// AUTO GENERATED CODE!
// CODE GENERATOR WILL NOT PRESERVE MANUAL CHANGES TO THIS CODE!
// 

// MIT License (MIT)
// 
// Copyright (c) 2014 K Ercan Turkarslan
// 
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
// 
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
// 
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
// 


using System;

namespace Mios.Generated.ServiceFiles
{
    // Generated from S_Camera1.xml
    
    public class Camera1Service : MiosService
    {
        #region UseCMS : Boolean;
        private Boolean? _mUseCMS;
        
        public Boolean UseCMS
        {
            get
            {
                return _mUseCMS ?? GetUseCMS();
            }
        }
        
        // WARNING: Service Description File does not contain any Get Action with a
        // argument related to this State Variable.
        // 
        // This may be due to a typo while defining the Get Action or state variable.
        // This may also be intentional. Code generator assumes this was a mistake and
        // generates this Get Action.
        
        #region Action GetUseCMS() : Boolean;
        public Boolean GetUseCMS()
        {
            _mUseCMS = FromLuupBoolean(Engine.Luup_VariableGet(base.DeviceId, base.ServiceId, "UseCMS"));
            
            return _mUseCMS.Value;
        }
        #endregion Action GetUseCMS
        
        #endregion
        
        #region VideoURLs : String;
        private String _mVideoURLs;
        
        public String VideoURLs
        {
            get
            {
                return _mVideoURLs ?? GetVideoURLs();
            }
        }
        
        // WARNING: Service Description File does not contain any Get Action with a
        // argument related to this State Variable.
        // 
        // This may be due to a typo while defining the Get Action or state variable.
        // This may also be intentional. Code generator assumes this was a mistake and
        // generates this Get Action.
        
        #region Action GetVideoURLs() : String;
        public String GetVideoURLs()
        {
            _mVideoURLs = FromLuupString(Engine.Luup_VariableGet(base.DeviceId, base.ServiceId, "VideoURLs"));
            
            return _mVideoURLs;
        }
        #endregion Action GetVideoURLs
        
        #endregion
        
        #region URL : String;
        private String _mURL;
        
        public String URL
        {
            get
            {
                return _mURL ?? GetURL();
            }
        }
        
        // WARNING: Service Description File does not contain any Get Action with a
        // argument related to this State Variable.
        // 
        // This may be due to a typo while defining the Get Action or state variable.
        // This may also be intentional. Code generator assumes this was a mistake and
        // generates this Get Action.
        
        #region Action GetURL() : String;
        public String GetURL()
        {
            _mURL = FromLuupString(Engine.Luup_VariableGet(base.DeviceId, base.ServiceId, "URL"));
            
            return _mURL;
        }
        #endregion Action GetURL
        
        #endregion
        
        #region DirectStreamingURL : String;
        private String _mDirectStreamingURL;
        
        public String DirectStreamingURL
        {
            get
            {
                return _mDirectStreamingURL ?? GetDirectStreamingURL();
            }
        }
        
        // WARNING: Service Description File does not contain any Get Action with a
        // argument related to this State Variable.
        // 
        // This may be due to a typo while defining the Get Action or state variable.
        // This may also be intentional. Code generator assumes this was a mistake and
        // generates this Get Action.
        
        #region Action GetDirectStreamingURL() : String;
        public String GetDirectStreamingURL()
        {
            _mDirectStreamingURL = FromLuupString(Engine.Luup_VariableGet(base.DeviceId, base.ServiceId, "DirectStreamingURL"));
            
            return _mDirectStreamingURL;
        }
        #endregion Action GetDirectStreamingURL
        
        #endregion
        
        #region RelatedSensors : String;
        private String _mRelatedSensors;
        
        public String RelatedSensors
        {
            get
            {
                return _mRelatedSensors ?? GetRelatedSensors();
            }
        }
        
        // WARNING: Service Description File does not contain any Get Action with a
        // argument related to this State Variable.
        // 
        // This may be due to a typo while defining the Get Action or state variable.
        // This may also be intentional. Code generator assumes this was a mistake and
        // generates this Get Action.
        
        #region Action GetRelatedSensors() : String;
        public String GetRelatedSensors()
        {
            _mRelatedSensors = FromLuupString(Engine.Luup_VariableGet(base.DeviceId, base.ServiceId, "RelatedSensors"));
            
            return _mRelatedSensors;
        }
        #endregion Action GetRelatedSensors
        
        #endregion
        
        #region SensorArchiveSeconds : UInt32;
        private UInt32? _mSensorArchiveSeconds;
        
        public UInt32 SensorArchiveSeconds
        {
            get
            {
                return _mSensorArchiveSeconds ?? GetSensorArchiveSeconds();
            }
        }
        
        // WARNING: Service Description File does not contain any Get Action with a
        // argument related to this State Variable.
        // 
        // This may be due to a typo while defining the Get Action or state variable.
        // This may also be intentional. Code generator assumes this was a mistake and
        // generates this Get Action.
        
        #region Action GetSensorArchiveSeconds() : UInt32;
        public UInt32 GetSensorArchiveSeconds()
        {
            _mSensorArchiveSeconds = FromLuupUInt32(Engine.Luup_VariableGet(base.DeviceId, base.ServiceId, "SensorArchiveSeconds"));
            
            return _mSensorArchiveSeconds.Value;
        }
        #endregion Action GetSensorArchiveSeconds
        
        #endregion
        
        #region RelatedLights : String;
        private String _mRelatedLights;
        
        public String RelatedLights
        {
            get
            {
                return _mRelatedLights ?? GetRelatedLights();
            }
        }
        
        // WARNING: Service Description File does not contain any Get Action with a
        // argument related to this State Variable.
        // 
        // This may be due to a typo while defining the Get Action or state variable.
        // This may also be intentional. Code generator assumes this was a mistake and
        // generates this Get Action.
        
        #region Action GetRelatedLights() : String;
        public String GetRelatedLights()
        {
            _mRelatedLights = FromLuupString(Engine.Luup_VariableGet(base.DeviceId, base.ServiceId, "RelatedLights"));
            
            return _mRelatedLights;
        }
        #endregion Action GetRelatedLights
        
        #endregion
        
        #region LightOptions : String;
        private String _mLightOptions;
        
        public String LightOptions
        {
            get
            {
                return _mLightOptions ?? GetLightOptions();
            }
        }
        
        // WARNING: Service Description File does not contain any Get Action with a
        // argument related to this State Variable.
        // 
        // This may be due to a typo while defining the Get Action or state variable.
        // This may also be intentional. Code generator assumes this was a mistake and
        // generates this Get Action.
        
        #region Action GetLightOptions() : String;
        public String GetLightOptions()
        {
            _mLightOptions = FromLuupString(Engine.Luup_VariableGet(base.DeviceId, base.ServiceId, "LightOptions"));
            
            return _mLightOptions;
        }
        #endregion Action GetLightOptions
        
        #endregion
        
        #region AutoArchiveSeconds : UInt32;
        private UInt32? _mAutoArchiveSeconds;
        
        public UInt32 AutoArchiveSeconds
        {
            get
            {
                return _mAutoArchiveSeconds ?? GetAutoArchiveSeconds();
            }
        }
        
        // WARNING: Service Description File does not contain any Get Action with a
        // argument related to this State Variable.
        // 
        // This may be due to a typo while defining the Get Action or state variable.
        // This may also be intentional. Code generator assumes this was a mistake and
        // generates this Get Action.
        
        #region Action GetAutoArchiveSeconds() : UInt32;
        public UInt32 GetAutoArchiveSeconds()
        {
            _mAutoArchiveSeconds = FromLuupUInt32(Engine.Luup_VariableGet(base.DeviceId, base.ServiceId, "AutoArchiveSeconds"));
            
            return _mAutoArchiveSeconds.Value;
        }
        #endregion Action GetAutoArchiveSeconds
        
        #endregion
        
        #region AutoArchivePreserveDays : UInt32;
        private UInt32? _mAutoArchivePreserveDays;
        
        public UInt32 AutoArchivePreserveDays
        {
            get
            {
                return _mAutoArchivePreserveDays ?? GetAutoArchivePreserveDays();
            }
        }
        
        // WARNING: Service Description File does not contain any Get Action with a
        // argument related to this State Variable.
        // 
        // This may be due to a typo while defining the Get Action or state variable.
        // This may also be intentional. Code generator assumes this was a mistake and
        // generates this Get Action.
        
        #region Action GetAutoArchivePreserveDays() : UInt32;
        public UInt32 GetAutoArchivePreserveDays()
        {
            _mAutoArchivePreserveDays = FromLuupUInt32(Engine.Luup_VariableGet(base.DeviceId, base.ServiceId, "AutoArchivePreserveDays"));
            
            return _mAutoArchivePreserveDays.Value;
        }
        #endregion Action GetAutoArchivePreserveDays
        
        #endregion
        
        
        #region Method SetVariable(String name, String value) : Boolean;
        internal override Boolean SetVariable(String name, String value)
        {
            switch(name)
            {
                case "AutoArchivePreserveDays":
                    _mAutoArchivePreserveDays = FromLuupUInt32(value); return true;
                case "AutoArchiveSeconds":
                    _mAutoArchiveSeconds = FromLuupUInt32(value); return true;
                case "DirectStreamingURL":
                    _mDirectStreamingURL = FromLuupString(value); return true;
                case "LightOptions":
                    _mLightOptions = FromLuupString(value); return true;
                case "RelatedLights":
                    _mRelatedLights = FromLuupString(value); return true;
                case "RelatedSensors":
                    _mRelatedSensors = FromLuupString(value); return true;
                case "SensorArchiveSeconds":
                    _mSensorArchiveSeconds = FromLuupUInt32(value); return true;
                case "URL":
                    _mURL = FromLuupString(value); return true;
                case "UseCMS":
                    _mUseCMS = FromLuupBoolean(value); return true;
                case "VideoURLs":
                    _mVideoURLs = FromLuupString(value); return true;
                default:
                    return false;
            }
        }
        #endregion Method SetVariable
        
        public Camera1Service(MiosEngine engine, UInt32 deviceId, String serviceId)
            : base(engine, deviceId, serviceId)
        {
            
        } //End Constructor
    } //End of class
} //End of Namespace

